package com.jingdianjichi.auth.common.enums;

import lombok.Getter;

/**
 * 用户状态枚举
 */
@Getter
public enum AuthUserStatusEnum {
    OPEN(0,"启用"),
    CLOSE(1,"禁止");
    public int code;
    public String desc;
    AuthUserStatusEnum(int code,String desc){
        this.code=code;
        this.desc=desc;
    }
    public static AuthUserStatusEnum getByCode(int code){
        for(AuthUserStatusEnum authUserStatusEnum:AuthUserStatusEnum.values()){
            if(authUserStatusEnum.getCode()==code){
                return authUserStatusEnum;
            }
        }
        return null;
    }
}
